package com.gzx.spring.apis.controller;

import com.gzx.risk.core.pojo.CommonResult;
import com.gzx.risk.core.tags.CommonLog;
import com.gzx.risk.core.vo.credit.C9004;
import com.gzx.spring.apis.service.HuarongService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@Tag(name = "华融资信查询接口")
@RestController
@RequestMapping("/apis/huarong")
public class ApisHuarongController {
    @Resource
    private HuarongService huarongService;

    @Operation(summary = "Huarong_c9004")
    @CommonLog("c9004")
    @PostMapping("/c9004")
    public CommonResult<String> c9004(@RequestBody C9004 c9004Req) throws Exception {
        String result = huarongService.C9004(c9004Req);
        return CommonResult.data(result);
    }

    @Operation(summary = "Huarong_c9005")
    @CommonLog("c9005")
    @PostMapping("/c9005")
    public CommonResult<String> c9005(@RequestParam(name = "serialNumber") String serialNumber) throws Exception {
        String result = huarongService.C9005(serialNumber);
        return CommonResult.data(result);
    }

    @Operation(summary = "Huarong_r9003")
    @CommonLog("r9003")
    @PostMapping("/r9003")
    public CommonResult<String> r9003(@RequestParam(name = "serialNumber") String serialNumber) throws Exception {
        String result = huarongService.R9003(serialNumber);
        return CommonResult.data(result);
    }
}
